11. Exercise: Query All Guests
Query All Guests
During this exercise, you'll run a select query on the SQLite database created for the waitlist app and update the list to show the number of rows based on the result of the query.
Exercise Code
Exercise: T07.03-Exercise-GetAllTheData
SOLUTION:
- Create getAllGuests method that returns a cursor
- Call it in onCreate and pass the cursor count to the adapter
- Update the adapter to reflect the new count in the list